Page({

  /**
   * 页面的初始数据
   */
  data: {
    list: [],
    id:'',
    flag:false
  },
  changelist(e) {
    var index = this.data.list[e.detail.value].classifyId
    wx.navigateTo({
      url: '../list/list?classifyId=' + index
    })
  },
  onLoad(options) {
    wx.request({
      url: 'https://route.showapi.com/1700-1?showapi_appid=1367085&showapi_sign=cb8507c33e4a43cfa34a954c91b91fd6',
      method: 'GET',
      data: {},
      header: {
        'content-type': 'application/json'
      },
      success: (res) => {
        console.log(res);
        this.setData({
          list: res.data.showapi_res_body.storylist
        })
      }
    })
  }
})